﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Model.EF;
using Model;

public partial class System_Ajax_MenuAjax : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            IRepository<SystemMenu> MenuRepository = new EntityRepository<SystemMenu>();

            string queryString = string.Format( "SELECT * FROM SystemMenus as it WHERE it.PMenuID={0} order by it.OrderBy desc",Request.QueryString[0].ToString());

            IList<SystemMenu> list = MenuRepository.FindBy(queryString);
            RptMenus.DataSource = list;
            RptMenus.DataBind();
        }
    }
}